<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>art-template</title>
    
</head>
<body>
    <!-- 在浏览器中引入文件 -->
    <!-- 模板引擎不关心字符串内容，只认识模板标记语言 例如，{{ }}
        {{ }} 语法被称为 mustache 语法，八字胡
    -->
    <script src="../../node_modules/art-template/lib/template-web.js"></script>
    <script type="text/template" id="tp1">
    Hello! Everyone! My name is {{ name }}.
    I'm {{ age }} years old.    
    I'm from {{ place }} and I like eatting {{ food }}. 
    </script>
    <script>
        var ret = template('tp1',{
            name: 'Tom',
            age: 20,
            place: 'Henan',
            food: 'rice'
        })
        console.log(ret)
    </script>
</body>
</html>